#encoding:utf-8
# @Time : 2021/9/9 23:55 
# @Author : 锦衣大镖客
# @File : ConfigUtils.py 
# @Software: PyCharm
# desc:
import os
from configparser import ConfigParser

configPath=os.path.join(os.path.dirname(__file__).split("api_test_frame")[0],"api_test_frame","conf")
class ConfigUtils:
    def __init__(self):
        self.cfg=ConfigParser()
        self.cfg.read(configPath+os.sep+"config.ini")
    @property
    def URL(self):
        url=self.cfg.get("defunct","URL")
        return url

if __name__ == '__main__':
    print(configPath)
    cfg=ConfigUtils()
    print(cfg.URL)
